$(document).ready(function() {
	displayFaculty();
	displayProject();
	displayInformation();
});

function displayInformation(){
	var params = {
		action: 'getByLimit',
		fromInformation: 0,
		toInformation: 8
	};
	sendRequest(URL_INFORMATION, 'GET', params, function(res){
		var data = JSON.parse(res);
		if(data[0]){
			$('#informationList').append(drawBigInformation(data[0]));
		}
		if(data[1]){
			$('#informationList').append(drawBigInformation(data[1]));
		}
		if(data[2]){
			$('#informationList').append(drawBigInformation(data[2]));
		}
		var smallNews1 = drawDiv('col-md-6 col-lg-6 col-sm-6 col-xs-6');
		var tempUl1 = drawUl('list-unstyled');
		if(data[3]){
			tempUl1.append(drawSmallNew(data[3]));
		}
		if(data[4]){
			tempUl1.append(drawSmallNew(data[4]));
		}
		if(data[5]){
			tempUl1.append(drawSmallNew(data[5]));
		}
		smallNews1.append(tempUl1);
		var smallNews2 = drawDiv('col-md-6 col-lg-6 col-sm-6 col-xs-6');
		var tempUl2 = drawUl('list-unstyled');
		if(data[6]){
			tempUl2.append(drawSmallNew(data[6]));
		}
		if(data[7]){
			tempUl2.append(drawSmallNew(data[7]));
		}
		if(data[8]){
			tempUl2.append(drawSmallNew(data[8]));
		}
		smallNews2.append(tempUl2);
		var tempDiv = drawDiv('col-md-12').append(drawDiv('row').append(smallNews1).append(smallNews2));
		$('#informationList').append(tempDiv);
	}, function(err){
	});
}